import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import uiRouter from '@/views/uiRouter.vue'
import About from '@/views/About.vue'
import Contacts from '@/views/Contacts.vue'
import Allcontacts from '@/views/second/Allcontacts.vue'
import Bob from '@/views/second/Bob.vue'
import Alice from '@/views/second/Alice.vue'
import Blog from '@/views/second/third/Blog.vue'
import Fax from '@/views/second/third/Fax.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/uirouter',
  },
  {
    path: '/uirouter',
    component: uiRouter,
  },
  {
    path: '/contacts',
    component: Contacts,
    children: [
      {
        path: '/allcontacts',
        component: Allcontacts,
      },
      {
        path: '/alice',
        component: Alice,
      },
      {
        path: '/bob',
        component: Bob,
        children: [
          {
            path: '/blog',
            component: Blog,
          },
          {
            path: '/fax',
            component: Fax,
          },
        ],
      },
    ],
  },
  {
    path: '/about',
    component: About,
  },
]
const router = new VueRouter({
  routes,
})
Vue.config.productionTip = false

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app')
